﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChiTietVanBan.aspx.cs" Inherits="WebHousingInfo.ChiTietVanBan" %>
<%@ Register Src="~/Controls/Header.ascx" TagName="Head" TagPrefix="Header" %>
<%@ Register Src="~/Controls/MenuFooter.ascx" TagName="MeNuDuoi" TagPrefix="MenuFooter" %>
<%@ Register Src="~/Controls/Footer.ascx" TagName="Foot" TagPrefix="Footer" %>
<%@ Register Src="~/Controls/QuangCaoTren.ascx" TagName="QCT" TagPrefix="QuangCaoTren" %>
<%@ Register Src="~/Controls/DanhMucNhaChoThue.ascx" TagName="CT" TagPrefix="DanhMucNhaChoThue" %>

<%@ Register Src="~/Controls/KhongGianSong.ascx" TagName="KGS" TagPrefix="KhongGianSong" %>
<%@ Register Src="~/Controls/TimKiemTrangCon2.ascx" TagName="TK2" TagPrefix="TimKiem2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Chi tiết văn bản</title>
</head>
<body>
    <form id="form1" runat="server">
        <div id="uni_wrapper">
        <Header:Head ID="Header" runat="server" />
            <div id="uni_main">
             <!-- E_Header Navigation Menu --> 
	            <div id="content" class="clearfix">
		            <div id="group_750_l">
			            <div id="banner">
				            <div class="banner_ad_left">
				                <a href="#"><img src="Images/image_dd.png" width="465px" height="175px" border="2" style="border:1px solid Gray" align="left" /></a>
				            </div>				           
			            </div>				            				            
			            <TimKiem2:TK2 ID="TK2" runat="server" />
			            <div id="ketquatimkiem" class="clearfix">
				            <div class="title_ketquatimkiem">
					            <p style="text-transform:uppercase">
						            Xem chi tiết văn bản
					            </p>
				            </div>
				            <% int mode = Convert.ToInt32(Request.QueryString["masach"]);
                                var obText = HousingInfo.Library.TextHouseBO.GetTextHouseBO(mode); %>
				            <div class="doc680 fleft">
                              <div class="docdesc680 fleft">
                                <div class="boxde_10">
                                  <div class="w676 fleft mb_8" id="VietAd"> 
                                        <h1 name="titleOrigin" id="titleOrigin" style="display: block;" class="w676 fbold mb_8"><%=obText.Title %></h1> 						           
                			       </div>
                                      <p class="share_by w676 fleft" style="margin-bottom:10px;">
	                                        <% if (getextension(obText.UrlDownload) == 1)
                                               { %>
				                                <img alt="doc" src="Image/doc.gif" />
				                            <% }
                                            else if (getextension(obText.UrlDownload) == 2)
                                               { %>
				                                <img alt="pdf" src="Image/pdf16x16.gif" />
				                            <% }%>
	                                        
	                                        Ngày đăng :<span class="cred"><%=Convert.ToDateTime(obText.CreatedDate).ToShortDateString() %></span>
	                                        | Lượt xem :<span class="cred"><%=obText.ViewCount %></span>
	                                        | <a href="TotalUpload/VanBan/<%=obText.UrlDownload %>">Download</a> : <span class="cred"><%=obText.DownloadCount %></span>
	                                        | <a onclick="show_form_vanban_two();" style="cursor:pointer; margin-left:5px;">Upload Văn Bản Mới</a>
	                                  </p>
                               </div>
                                  </div>
                                <div class="docread680">
                                    <iframe src="http://docs.google.com/gview?url=http://housinginfo.tk/HD_thi_hanh_luat_BDS.pdf&embedded=true" style="width:730px; height:500px;" frameborder="0"></iframe>
			                    </div>
			                    
	                        <div id="boxde02" class="box_680">
	                            <div class="comtitle">
	                              <div class="ttright">
		                            <p class="ttmid">
			                            <span class="iconexp" title="Thu gọn"></span>
			                            <span class="textleft">Tài Liệu Khác</span>
			                        </p>
	                              </div>
	                            </div>
	                            <% var ObOrther = HousingInfo.Library.TextHouseBOList.GetOrtherTextHouse(obText.TextHouseID, 6); %>
	                            <div class="content_680">
	                                <ul class="listdoc03">
	                                <% foreach (var ortherdetail in ObOrther)
                                    { %>								      
								      <li>
				                            <a class="icon" href="ChiTietVanBan.aspx?masach=<%=ortherdetail.TextHouseID %>" title="van ban khac">
				                                 <% if (getextension(obText.UrlDownload) == 1)
                                                { %>
				                                    <img alt="doc" src="Image/doc24x30.gif" />
				                                <% }
                                                else if (getextension(obText.UrlDownload) == 2)
                                                   { %>
				                                    <img alt="pdf" src="Image/pdf24x30.gif" />
				                                <% }%>
				                            </a>
		                                    <div class="textright">
			                                    <p><a href="ChiTietVanBan.aspx?masach=<%=ortherdetail.TextHouseID %>" title="Ten sach"><%= ortherdetail.Title %></a></p>
			                                    <p class="fs11">Ngày đăng: <span class="cred"><%=Convert.ToDateTime(ortherdetail.CreatedDate).ToShortDateString() %></span><span class="plr_5">
			                                    | </span>Lượt xem:<span class="cred"><%=ortherdetail.ViewCount %></span><span class="plr_5">
			                                    | </span>Download: <span class="cred"><%=ortherdetail.DownloadCount %></span></p>
		                                    </div>
			                         </li>		
			                         <%} %>				         
						       </ul>
	                      </div>
                     </div>    
                </div>
            </div>    
			        </div>	  
		            <div id="group_5">
			            <DanhMucNhaChoThue:CT ID="DanhMucNhaChoThue" runat="server" />
			           
			            <KhongGianSong:KGS ID="KhongGianSong" runat="server" />
		            </div>
		             </div>
	            <!--E_menu-->
	            </div>	
	            <div id="formvanban_two" style="display:none;">
		            <div class="loadervanban_two" style="border: 1px solid blue; width:320px;">
		                <div style="background:yellow; font-weight:bold; padding:5px;">Upload văn bản mới</div>
		                <div style="border-top:1px solid red; padding:5px; background:#E1E1E1;">
		                    <div style="margin-bottom:5px;">
		                        <p style="width:100px; font-weight:bold; color:Blue; float:left; margin-right:10px;">Tên file văn bản</p>		                
                                <asp:TextBox ID="txtten" Width="180px" runat="server"></asp:TextBox>
                            </div>
                            <div>
		                        <p style="width:100px; font-weight:bold; color:Blue; float:left; margin-right:10px;">Chọn file văn bản</p>		                
                                <asp:FileUpload ID="FileUpload_VanBan" Width="180px" runat="server" /><br />                            
                            </div>
                            Lưu ý chỉ cho phép upload các định dạng .doc, .pdf
                            <div style="margin-top:5px;">                            
                                <asp:LinkButton ID="lbtupload" runat="server" onclick="lbtupload_Click">Upload</asp:LinkButton>  
                                <a onclick="hide_form_vanban_two();" style="cursor:pointer; margin-left:5px;">Huỷ</a>
                            </div>
		                </div>
		            </div>		            
		        </div>	
		        <script type="text/javascript">
                function show_form_vanban_two(){
                $('#formvanban_two').show();
                }
                function hide_form_vanban_two(){
                $('#formvanban_two').hide();
                }

                $('#formvanban_two').hide();

                </script>
                <MenuFooter:MeNuDuoi ID="MenuFooter" runat="server" />
            </div>
            <div>
            
            </div>
            <Footer:Foot ID="Footer" runat="server" />
    </form>
</body>
</html>
